//对外暴露的常路由constantRouter
export const constantRouter = [
  //登录页面路由
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录', //路由菜单标题
      hidden: true, //路由标题是否隐藏  true 隐藏  false:不隐藏
      icon: 'Promotion', //菜单左侧文字图标
    },
  },
  // 登录成功之后展示数据的路由
  {
    path: '/',
    // component: import('@/views/home/index.vue'),
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: 'layout',
      hidden: false,
      icon: 'Avatar',
    },
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页', //路由菜单标题
          hidden: false,
          icon: 'HomeFilled',
        },
      },
      // {
      //   path: '/ceshi',
      //   component: () => import('@/views/home/index.vue'),
      //   meta: {
      //     title: '测试', //路由菜单标题
      //     hidden: true,
      //     icon:'HelpFilled'
      //   },
      // },
    ],
  },
  //404
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404', //路由菜单标题
      hidden: true,
      icon: 'StarFilled',
    },
  },
  //重定向
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由', //路由菜单标题
      hidden: true,
      icon: 'Histogram',
    },
  },
]
